(function(){
	angular.module('app')
		.factory('HomeFactory',fn);
	function fn($http,urlCnst){
		var self = {};
		var baseUrl='http://139.224.114.96:8080/dilitter/';
		self.login = function(name,pwd,cb){
			$http.post(baseUrl+'login',{
				UserName:name,
				Password:pwd
			}).then( function(res){
				cb(null,res.data);
			}, function(res){
				cb(res);
			});
		}
        self.getConsultantList = function (cb) {
            urlCnst.get('admin-consultant/user',cb);
        };
        //self.getConsultantIntroduce = function (name) {
        //    $state.go('admin-consultant/user/{{username}}', {"userName": name || self.name});
        //};
		return self;
	}
})();
